1. Field of the Invention
The present invention relates to an image processing method and the processing apparatus for cutting out an object from an image, obtaining a transparency of the object, and overlaying the object on a two-dimensional image.
2. Description of the Related Art
The technology for overlaying an image of an object on another background image is often used in a movie, television and the like. In addition, the technology is also used for obtaining a three-dimensional image by taking images of the object from many directions. In the technology, segmentation is necessary for removing the background image from an image taken by a camera.
One of the general segmentation methods is a chroma key method. In this chroma key method, a picture is taken while the background is set to be a signal color, and an area having the same color as the background color is removed from the image. However, according to the chroma key method, unevenness of background color may appear due to environmental conditions for taking the image. In addition, when the object has a color similar to the color of the background, the object cannot be clearly cut out.
Another method for the segmentation is that a background without the object is taken first, and an image including the object is taken, then, the object is cut out by comparing the images. According to this method, there is merit in that the object can be cut out even when the background has a single color. However, like the chroma key method, the object cannot be clearly cut out when the background includes a shadow of the object, or when the object includes an area similar to the background.
In a method disclosed in Japanese laid-open patent application No.2001-148021, the above-mentioned problems are solved by using a plurality of pictures in which the background is different for each picture. However, even though this method is used; when the surface of the object is reflective so that the background image is reflected off the surface of the object, or, when the object is semi-transparent so that the background is seen through the object, there is a problem in that a part of the object may disappear. In this case, as shown in FIG. 3, when the object is overlaid on the background image, the object seems unnatural.
According to Japanese laid-open patent application No.2001-143085, a method is proposed for obtaining transparency of the object by using a background of black and white stripes. However, this method is limited to a special case where the transparency of the object is even.
As mentioned above, according to the conventional segmentation methods, there are the following problems. When the object is semi-transparent, or when the surface is reflective, a part of the image of the object is unnaturally lacking, so that the background and the object cannot be clearly separated. Thus, when the image of the object is overlaid on another image, the overlaid image becomes bad-looking.